Skip to content

Conversation

@katsyoshi
Copy link
Owner

@katsyoshi katsyoshi commented Jan 13, 2026

Summary

  • Move exec relocation application into Builder and emit fully-relocated .text.
  • Drop .rel*/.rela* sections from exec outputs.
  • Simplify Writer to use section headers from the builder (no _start injection or relocation).

Details

  • Merge .text across inputs, track per-object offsets, and rebase symbols.
  • Rebuild .symtab/.strtab and set section header linkage based on final order.
  • Enforce a single executable layout (.text at 0x1000, entry at 0x401000).

Tests

  • rake test

Checklist

  • Switch Linker API to accept multiple inputs.
  • Read multiple ELF objects and feed them into a builder.
  • Concatenate .text sections into a single output section.
  • Preserve non-.text sections from the first input.
  • Resolve and validate global symbols (duplicate globals error).
  • Apply relocations in builder and drop .rel*/.rela* for exec outputs.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fd8a6ea375

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@katsyoshi katsyoshi force-pushed the support-multi-files-for-linker branch from 95e9d8a to 383a1f6 Compare January 17, 2026 01:35
@katsyoshi katsyoshi merged commit e0e5ed0 into main Jan 18, 2026
2 checks passed
@katsyoshi katsyoshi deleted the support-multi-files-for-linker branch January 18, 2026 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants